Skip to content

refactor: extract network browser submodels#190

Merged
nathanhuh merged 2 commits intomainfrom
refactor/107-network-browser-submodels
Apr 28, 2026
Merged

refactor: extract network browser submodels#190
nathanhuh merged 2 commits intomainfrom
refactor/107-network-browser-submodels

Conversation

@nathanhuh
Copy link
Copy Markdown
Contributor

Summary

Refactors the TUI root model by moving the VPC/Subnet browser and Reachability Analyzer state, message handling, key handling, filtering, commands, and views behind dedicated feature submodels.

  • adds VPC and Reachability implementations to the existing feature submodel contract
  • removes their root Model state and root app dispatch/view/filter branches
  • keeps existing VPC/Subnet and Reachability behavior covered through updated tests

Related Issues

Refs #107

Validation

  • make test
  • make build
  • git diff --check

Checklist

  • Scope is focused
  • Branch name follows docs/branch-naming-harness.md
  • Documentation harness reviewed (docs/documentation-harness.md)
  • README updated if user-facing behavior changed
  • Relevant docs/ pages updated if architecture, auth, config, or workflow changed
  • Tests/validation included
  • Breaking changes documented

No user-facing behavior changes or breaking changes.

Copy link
Copy Markdown
Contributor

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refactoring successfully extracts VPC and Reachability functionality into dedicated submodels (vpcModel and reachabilityModel), following the same pattern as other feature submodels in the codebase. The changes improve code organization by reducing the size of the main Model struct and encapsulating feature-specific state and behavior.

Key improvements:

  • VPC and Reachability state moved from main Model to dedicated submodels
  • Methods properly refactored to use receiver methods on submodels
  • featureSubmodel interface correctly implemented with HandleMessage, HandleKey, View, and ApplyFilter methods
  • Tests updated to work with the new structure

The refactoring correctly preserves all functionality while improving maintainability.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@nathanhuh nathanhuh force-pushed the refactor/107-network-browser-submodels branch from 55a0fd4 to c86a37a Compare April 28, 2026 04:08
@nathanhuh
Copy link
Copy Markdown
Contributor Author

/q review

Copy link
Copy Markdown
Contributor

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refactoring successfully extracts VPC/Subnet browser and Reachability Analyzer functionality into dedicated submodels, following the established pattern used for other features like ECS, RDS, and Route53. The changes improve code organization and maintainability without introducing any defects.

The refactoring:

  • ✅ Properly implements the featureSubmodel interface for both vpcModel and reachabilityModel
  • ✅ Maintains all existing functionality with clean state encapsulation
  • ✅ Updates and maintains comprehensive test coverage
  • ✅ Follows consistent patterns with other feature submodels in the codebase

No blocking issues found. The code is ready to merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@nathanhuh nathanhuh merged commit 939c0f9 into main Apr 28, 2026
2 checks passed
@nathanhuh nathanhuh deleted the refactor/107-network-browser-submodels branch April 28, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants